<!DOCTYPE html>
<html lang="<?= locale_to_bcp_47(get_current_locale()) ?>">
    <head>
        <meta charset="UTF-8" />
        <title><?= is_environment('development') ? '[dev] ' : '' ?><?= $title ?> · <?= get_app_configuration('brand') ?></title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <link rel="shortcut icon" href="<?= url_static('favicon-32px.png') ?>">
        <meta name="robots" content="noindex">

        <link rel="stylesheet" href="<?= url_asset('stylesheets/application.css') ?>" data-turbo-track="reload">

        <?php if (get_app_configuration('plausible_url')): ?>
            <script defer data-domain="<?= get_current_host() ?>" src="<?= get_app_configuration('plausible_url') ?>/js/script.js"></script>
        <?php endif; ?>
    </head>

    <body>
        <div class="layout layout--error">
            <header class="layout__header">
                <nav>
                    <a class="layout__link" href="<?= url('home') ?>">
                        <?= _('Oh no&nbsp;😟') ?>
                    </a>
                </nav>
            </header>

            <main class="layout__main">
                <?= $this->safe('content') ?>

                <?php if (!is_environment('production') && $error): ?>
                    <pre class="layout--error__box"><?= (string)$error ?></pre>
                <?php endif; ?>
            </main>
        </div>
    </body>
</html>
